package org.sky.autoconfigure;

import lombok.Data;
import org.sky.autoconfigure.support.YamlPropertySourceFactory;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.PropertySource;

/**
 * @author weifx
 * @Title: SkyProperties
 * @ProjectName springboot-platform
 * @Description: TODO{Sky自定义配置文件
 *                      PropertySource：默认不能读取yml文件;通过指定factory实现读取yml
 *                  }
 * @date 2019/3/1 10:53
 * @Version 1.0
 */
@Configuration
@PropertySource(value = {"classpath:config.yml"},
                encoding = "UTF-8",
                factory = YamlPropertySourceFactory.class)
@ConfigurationProperties(
        prefix = "sky"
)
@Data
public class SkyProperties {
    /**
     * 产品名称
     */
    private String productName;
    /**
     * 产品模式
     */
    private boolean productModel;
    /**
     * 附件路径
     */
    private String attachmentDir;
}
